home *** CD-ROM | disk | FTP | other *** search
- @echo OFF
- REM *******************************************************************
- REM *** SCRANDOM.BAT - Demonstrate SCREEN.LIB by putting characters ***
- REM *** ver.1 randomly all over the screen ***
- REM *******************************************************************
- CEnvi %0.bat
- GOTO CENVI_EXIT
-
- #include "Screen.lib"
-
- // Get Screen Height and Width
- ScrHeight = ScreenSize().row;
- ScrWidth = ScreenSize().col;
-
- // Initialize a random random number generator
- srand();
-
- // Until key is hit, write random square, random color, random location
- while ( !kbhit() ) {
- ScrWrite( '█',rand() % ScrHeight,rand() % ScrWidth,rand() % 0x10,BLACK );
- }
-
- // flush the keyboard
- while( kbhit() ) getch();
-
- ScreenCursor(ScrWidth-1,ScrHeight-1);
-
- :CENVI_EXIT